home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / i-fortra.ads < prev    next >
Text File  |  1996-01-30  |  3KB  |  60 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT COMPILER COMPONENTS                         --
  4. --                                                                          --
  5. --                   I N T E R F A C E S . F O R T R A N                    --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.5 $                              --
  10. --                                                                          --
  11. -- This specification is adapted from the Ada Reference Manual for use with --
  12. -- GNAT.  In accordance with the copyright of that document, you can freely --
  13. -- copy and modify this specification,  provided that if you redistribute a --
  14. -- modified version,  any changes that you have made are clearly indicated. --
  15. --                                                                          --
  16. ------------------------------------------------------------------------------
  17.  
  18. with Ada.Numerics.Generic_Complex_Types;
  19. pragma Elaborate_All (Ada.Numerics.Generic_Complex_Types);
  20.  
  21. package Interfaces.Fortran is
  22. pragma Pure (Fortran);
  23.  
  24.    type Fortran_Integer  is new Integer;
  25.    type Real             is new Float;
  26.    type Double_Precision is new Long_Float;
  27.    type Logical          is new Boolean;
  28.  
  29.    package Single_Precision_Complex_Types is
  30.       new Ada.Numerics.Generic_Complex_Types (Real);
  31.  
  32.    type Complex is new Single_Precision_Complex_Types.Complex;
  33.  
  34.    type Imaginary is new Single_Precision_Complex_Types.Imaginary;
  35.    i : constant Imaginary := Imaginary (Single_Precision_Complex_Types.i);
  36.    j : constant Imaginary := Imaginary (Single_Precision_Complex_Types.j);
  37.  
  38.    type Character_Set is new Character;
  39.  
  40.    type Fortran_Character is array (Positive range <>) of Character_Set;
  41.    pragma Pack (Fortran_Character);
  42.  
  43.    function To_Fortran (Item : in Character)     return Character_Set;
  44.    function To_Ada     (Item : in Character_Set) return Character;
  45.  
  46.    function To_Fortran (Item : in String)            return Fortran_Character;
  47.    function To_Ada     (Item : in Fortran_Character) return String;
  48.  
  49.    procedure To_Fortran
  50.      (Item   : in String;
  51.       Target : out Fortran_Character;
  52.       Last   : out Natural);
  53.  
  54.    procedure To_Ada
  55.      (Item   : in Fortran_Character;
  56.       Target : out String;
  57.       Last   : out Natural);
  58.  
  59. end Interfaces.Fortran;
  60.